package com.ap.core.bulkupload.rules;


import com.ap.core.bulkupload.info.BulkUploadMerchantRequestInfo;
import com.ap.core.validation.rules.AbstractValidationRule;

/**
 * User: Gibu.Paul
 * Validate no of nodes in merchant Bulk upload XML matches the totalCount in XML
 */
public class MerchantRecordsRule extends AbstractValidationRule<BulkUploadMerchantRequestInfo> {


    /* (non-Javadoc)
     * @see com.ap.core.validation.rules.ValidationRule#validate(java.lang.Object)
     */
    @Override
    public boolean validate(BulkUploadMerchantRequestInfo  infoObject) {
    	
    	return infoObject.getTotalMerchantcount() == infoObject.getTotalTrailerCount();
    }
    	
}
